#include "wxdialog.h"

wxDialog::wxDialog() :
        m_state(Normal),
        m_state_prev(Normal),
        m_fullscreen(false),
        m_active(false),
        m_shown(false),
        m_width(60),
        m_height(50)
{
    //ctor
}

wxDialog::~wxDialog()
{
    //dtor
}

inline bool wxDialog::Show(bool show)
{
    m_shown = show;

    return true;
}

inline bool wxDialog::IsActive() const
{
    return m_active;
}

inline std::string wxDialog::GetTitle() const
{
    return m_title;
}

inline void wxDialog::SetTitle(const std::string& title)
{
    m_title = title;
}

inline bool wxDialog::IsFullScreen() const
{
    return m_fullscreen;
}

inline bool wxDialog::ShowFullScreen(bool show)
{
    m_fullscreen = show;

    return true;
}

inline bool wxDialog::IsIconized() const
{
    return m_state == Minimized;
}

inline bool wxDialog::IsMaximized() const
{
    return m_state == Maximized;
}

inline void wxDialog::Iconize(bool iconize)
{
    m_state = Minimized;
    
    StateChanged.emit(m_state);
}

inline void wxDialog::Restore()
{
    // restore
    StateChanged.emit(Normal);
}

inline void wxDialog::Maximize(bool maximize)
{
    if (maximize)
        m_state = Maximized;
    else
        Restore();
        
    StateChanged.emit(Maximized);
}

inline void wxDialog::KeyPress(char key)
{
    KeyPressed.emit(key);   
}

inline void wxDialog::Size(int width, int height)
{
    m_width = width;
    m_height = height;
    
    Resized.emit(m_width, m_height);
}

inline void wxDialog::Close()
{
    Closed.emit();
}

inline void wxDialog::PressOK()
{
    OKed.emit();
}

inline void wxDialog::PressApply()
{
    Applied.emit();
}

inline void wxDialog::PressCancel()
{
    Canceled.emit();
}
